[//
    async function( kuo,Context,context){
        Context.headers["content-type"] = 'application/json; charset=UTF-8';
        let StartTime = Date.now();

        if(Debug){
            console.log("\nMillis Start");
        }

        let  $features = await Kuoplus(kuo.class);
        let LOGOFF = $features ['configure']['日志记录']?$features ['configure']['日志记录'][0]:'0';

        let $DATA = Object.assign({},this.$DATA);
        let $Grade  = -1; //权限      88超级管理员
        let $UID = 0; //用户id
        let $ADMINID = 0; //管理id
        let $TAGS =  kuo.Path[0]?kuo.Path[0]:'';//tags表格
        let $ToKen = kuo.Path[1]?kuo.Path[1]:''; //token 安全验证
        let $_ToKen = ""; //本地token
        let $SSHASH = "session/"+kuo.sessionid; //session名字
        let $_SESSION = await Mem.Get($SSHASH); //获取session

        if(!$_SESSION ){

            $_SESSION ={ 
                adminid: 0,
                uid:0,
                grade:-1,
                token:""
            };

        }else{

            $Grade  = $_SESSION.grade?$_SESSION.grade:0;
            $UID      = $_SESSION.uid;
            $_ToKen = $_SESSION.token;
            $ADMINID=$_SESSION.adminid?$_SESSION.adminid:0;
        }

        if(LOGOFF == '1'){
            let logdb = await db('apijson_log');
            logdb.Insert({
                'route':kuo.path,
                'method':kuo.method,
                'head':json_encode(kuo.headers),
                'body':kuo.body.toString(),
                'sessionid':kuo.sessionid,
                'atime':Mode("Tools").Time(),
                'uid':$UID,
                'grade':$Grade,
                'ip':kuo.ip
            });
            if(Debug){
                console.log('Millis ', Date.now() -StartTime);
            }
        }




        if(this.Security){
            $DATA.token = Mode("Tools").Uuid();
            await Mem.Put($SSHASH,{token:$DATA.token},Expiredseconds);
            if($_ToKen != $ToKen){
                $DATA.code = 401;
                $DATA.session = kuo.sessionid;
                Context.body = JSON.stringify($DATA);
                if(Debug){
                    console.log('Millis ', Date.now() -StartTime);
                }
                return ;
            }
        }

        if($TAGS != ""){
            let  Validation = await this.PermissionValidation(kuo.func_,$TAGS,$Grade);
            if(Validation){
                $DATA.code = 401;
                Context.body = JSON.stringify($DATA);
                if(Debug){
                    console.log('Millis ', Date.now() -StartTime);
                }
                return  ;
            }
        }


        let Arguments = json_decode(kuo.body);
       
        if(count(Arguments) > 0){
            $DATA.code = 200;
            //先进行权限验证
            let  Validation = await this.ArgumentsValidation(Arguments,kuo.func_,$Grade);
            
            if(Validation){
                $DATA.code = 401;
                Context.body = JSON.stringify($DATA);
                if(Debug){
                    console.log('Millis ', Date.now() -StartTime);
                }
                return  ;
            }

            if($TAGS != ""){

                if(!Arguments[$TAGS]){
                    let _Arguments = Arguments;
                    Arguments= {};
                    Arguments[$TAGS] = _Arguments;
                }
            }


            await  this.$ADD("",Arguments,$DATA,kuo.func_,$Grade,$_SESSION);

        
            /*
            401 权限不足 404 没有数据  
            200 数据成功
            500系统错误 
            503系统超限
             * 表单验证和 处理 解析sql 读取sql
            */
            

            //"@column":"userId;max(id):maxId",
            //"@group":"userId",
            // "@having":"(maxId)>=100"
            //"@count":5,
            //"@page":3
            //"@order":"column0+,column1-..."，排序方式


        }else{
            $DATA.code = 404;
        }
 
        if($DATA.code != 200 && this.StatusCode){
            Context.statusCode = $DATA.code;
            Context.body = "";
            if(Debug){
                console.log('Millis ', Date.now()  -StartTime);
            }
            return ;
        }

        Context.body = JSON.stringify($DATA);
        if(Debug){
            console.log('Millis ', Date.now()  -StartTime);
        }
    }
]